The results that contain the OPC-UA attribute data (instances of UAAttributeDataResult) can be formatted using standard or custom format strings.
UAAttributeDataResult inherits from OperationResult, including its formatting capabilities, and adds some new. Only the new and/or modified capabilities are described here; please referrer to OperationResult formatting description for all the inherited capabilities.
Standard and custom format strings are supported by some overloads of the ToString method. For example, you can supply a format string to the ToString(String) and ToString(String, IFormatProvider) methods. Standard and custom format strings are also supported by the .NET Framework composite formatting feature, which is used by some Write and WriteLine methods of the Console and StreamWriter classes, the String.Format method, and the StringBuilder.AppendFormat method. The composite format feature allows you to include the string representation of multiple data items in a single string, to specify field width, and to align values in a field.The following table describes the standard format strings and displays sample output produced by each format specifier.
Format specifier | Name | Description | |
“f” | Full (short) | As "F" for OperationResult, with added attribute data in short format. | |
“F” | Full (long) | As for OperationResult, with added attribute data. | |
“g” | General (short) | As for OperationResult, with added attribute data when present, in short format. | |
“G” | General (long) | As for OperationResult, with added attribute data when present. |
The following table describes the custom format specifiers and displays sample output produced by some of the format specifiers.
Format specifier | Name | Description | |
Format specifiers inherited from OperationResult, and: | |||
A A(format) |
AttributeData | Value of the named property, optionally formatted with format. | |
Z Z(format) |
StatusInfo | Value of the named property, optionally formatted with format. | Warning |